const path = require('path')

module.exports = {
  // 公共路径(必须有的)
  publicPath: "./",
  // 静态资源存放的文件夹(相对于ouputDir)
  // assetsDir: "static",
  devServer: {
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        pathRewrite: {
          '^/api': '/mock'
        }
      }
    }
  },
  chainWebpack: (config) => {
    config.resolve.alias.set('styles', path.join(__dirname, './src/assets/styles/'))
      .set('@', path.join(__dirname, './src/'))
      .set('common', path.join(__dirname, './src/common'))
  },
}

